<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import = "com.db4o.ext.ExtObjectContainer" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "java.util.*" %>
<%  Db4oCareTaker db4oct = new Db4oCareTaker(session,"padova"); %>
<% 
	
	com.db4o.ObjectContainer co = db4oct.getContainer();
	com.db4o.query.Query q = db4oct.newQuery(PianoDeiConti.class)  ;
	com.db4o.query.Query qu = db4oct.newQuery(Circolo.class)  ;
	
	qu.descend("codice").constrain("aba");
	
	auser.Circolo c = (auser.Circolo) qu.execute().get(0);
	
	//q.descend("livello").constrain(4);//.smaller();
	q.descend("circolo").constrain(null);
	
	List<PianoDeiConti> pc = q.execute();
	for(int i=0;i<pc.size();i++){
		pc.get(i).setCircolo(c);
		co.set(pc.get(i));
	} 
	co.commit();	 
%>
<%=new Date() %><br>
<c:forEach var="item" items="<%=pc %>">
	${item.codice}  - ${item.descrizione} ${item.livello} ${item.circolo.codice}<br>
</c:forEach>
	
